/* Yup Another Light-Box WannaBe */

var Sky_Box = new Class({
	
	options: {
		outerFadeLayer: true,
		outerFadeColor: "#000000",
		outerFadeTime: 1000, //MS
		outerOpacity: 0.75,
		
		innerBGColor: "#000000",
		innerFadeTime: 1000,
		innerFadeDelay: 1000,
		innerOpacity: 0.75,
		
		moveEffect: {
			disabled: true,
			time: 1000,
			left: -100,
			top: -100
		},
		
		hotKeys: {
			27 : function(){
				this.close();
			}
		},
		
		width: -1, 
		height: -1,
		left: -1,
		top: -1,
		
		moveAble: true,
		resizeAble: true,
		closeAble: true,
		
		onOpen: function(window){},
		onClose: function(window){},
		onMove: function(window){},
		onResize: function(window){},
		onClick: function(window){},
		onDblClick: function(window){}
	},
	
	el: {
		/* All The Elements From Build() Go Here */
	},
	
	initialize: function(options)
	{
		this.setOptions(options);
		this.build();
	},
	
	build: function()
	{
		if(this.options.outerFadeLayer)
		{
			this.el.fadeLayer = new Element('div',{
				'class': 'Sky_Box_Fade_Layer',
				'styles': {
					'opacity':0,
					'background-color':this.options.outerFadeColor,
					'display':'none'
				},
				events: {
					click: this.clickHandler
				}
			});
			
			this.el.fadeLayer.fx = new Fx.Styles(this.el.fadeLayer, {
				duration: this.options.outerFadeTime,
				wait: false,
				transition: Fx.Transitions.Quad.easeOut
			});
			
		}
		
		this.box = new Element('div', {
			'class': 'Sky_Box',
			styles: {
				display: 'none',
			}
		});
		
		this.el.div = new Element("div");
		
		this.el.fadeLayer.injectInside(document.body);
	},
	
	clickHandler: function()
	{
		
	},
	
	open: function(delay)
	{
//		this.settings.lastOnKeyPress = document.body.onkeypress;
//		document.body.onkeypress = self.runHotKeys;
//		
//		self.colorShade.style.zIndex = Plex.UI.zIndex++;
//		self.contentDiv.style.zIndex = Plex.UI.zIndex++;
		
		this.el.fadeLayer.fx.start({
			'opacity':this.options.outerOpacity
		})
	},
	
	close: function(delay)
	{
		
	},
	
	resize: function(w,h)
	{
		
	},
	
	move: function(x,y)
	{
		
	}
	
});

Sky_Box.implement( new Options, new Events );